<#import "/global.ftl" as role_menu_edit />
<form id="roleMenuEditForm" method="post">
    <table>
        <tr>
            <td><label for="roleId">roleId:</label></td>
            <td>
                <input class="easyui-combobox" type="text" id="roleId" name="sysRoleMenu.roleId"
                   data-options="required:true,valueField:'roleId',textField:'roleName',url:'<@role_menu_edit.basePath/>/sys/role/menu/roles',value:'${sysRoleMenu.roleId}'"/>
            </td>
        </tr>
        <tr>
            <td><label for="menuId">menuId:</label></td>
            <td>
                <select id="menuId" class="easyui-combotree" name="sysRoleMenu.menuId" style="width:200px;"
                        data-options="valueField:'menuId',textField:'menuName',url:'<@role_menu_edit.basePath/>/sys/role/menu/menus',required:true,value:'${sysRoleMenu.menuId}'">
                </select>
            </td>
        </tr>
    </table>
    <input type="hidden" name="pageType" value="${pageType}" />
    <input type="hidden" name="sysRoleMenu.roleMenuId" value="${sysRoleMenu.roleMenuId}" />
</form>
<script type="text/javascript">
    function roleMenuEditSubmit(){
        $.post('<@role_menu_edit.basePath/>/sys/role/menu/save',
            $("#roleMenuEditForm").serialize(),
            function(data){
                if(true==data.success){
                    $("#roleMenuTables").datagrid('reload');
                    $('#addRoleMenuDiv').dialog('close');
                } else {
                    $.messager.alert('error',data.message);
                }
            });
    }

</script>

